package com.candy.test;

import java.util.Scanner;

public class zy06 {
    public static void main(String[] args) {
        System.out.println("请输入第一个数：");
        Scanner sc=new Scanner(System.in);
        int x=sc.nextInt();
        System.out.println("请输入第二个数：");
        int y=sc.nextInt();
        System.out.println("请输入第三个数：");
        int z=sc.nextInt();
        int t;
        if(x>y){
            t=x;
            x=y;
            y=t;
        }
        if(x>z){
            t=x;
            x=z;
            z=t;
        }
        if(y>z){
            t=y;
            y=z;
            z=t;
        }
        System.out.println("三个数从小到大排序为：" +
                x+","+y+","+z);
    }
}
